package com.springboot.jdk.concurrency;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 线程安全Map案例
 *
 * @author: zr
 * @date: 2021-10-10
 */
public class ConcurrentHashMapDemo {

    public static void main(String[] args) {
        ConcurrentHashMap<String, String> concurrentHashMap = new ConcurrentHashMap();
        concurrentHashMap.put("k1", "v1");
        concurrentHashMap.put("k2", "v2");
        concurrentHashMap.put("k3", "v3");
        System.out.println(concurrentHashMap);
    }

}
